desc 'Send code coverage to CodeClimate'
task :send_coverage do
  if ENV.key? 'CODECLIMATE_REPO_TOKEN'
    require 'simplecov'
    require 'codeclimate-test-reporter'
    CodeClimate::TestReporter::Formatter.new.format(SimpleCov.result)
  else
    puts 'Please set the CodeClimate token.'
  end
end
